﻿namespace Shanda.DevFx.Security.Web.Pages
{
    using System;

    public class PagerPageEventArgs : EventArgs
    {
        private int newPageIndex;
        private int pageSize;

        public PagerPageEventArgs(int newPageIndex, int pageSize)
        {
            this.NewPageIndex = newPageIndex;
            this.pageSize = pageSize;
        }

        public int NewPageIndex
        {
            get
            {
                return this.newPageIndex;
            }
            set
            {
                if (value < 0)
                {
                    throw new ArgumentOutOfRangeException("value");
                }
                this.newPageIndex = value;
            }
        }

        public int PageSize
        {
            get
            {
                return this.pageSize;
            }
        }
    }
}

